package com.black.play.constant;

import com.black.play.config.AppConfig;

public interface AppConstant
{
    String appLanguage = AppConfig.getOrDefault("app.language", "CH");
    boolean isChinese = appLanguage.equals("CH");
    int SECOND = 1000;
    String GAME = "game";
    String PAUSE = "pause";
    String MENU = "menu";
    String TIME = isChinese ? CH.TIME : EN.TIME;
    String TIPS = isChinese ? CH.TIPS : EN.TIPS;
    String START = isChinese ? CH.START : EN.START;
    String CONTINUE = isChinese ? CH.CONTINUE : EN.CONTINUE;
    String BACK = isChinese ? CH.BACK : EN.BACK;
    String RESTART = isChinese ? CH.RESTART : EN.RESTART;
    String EXIT = isChinese ? CH.EXIT : EN.EXIT;
    String SETTINGS = isChinese ? CH.SETTINGS : EN.SETTINGS;
    String NOTICE = isChinese ? CH.NOTICE : EN.NOTICE;
    String ERROR = isChinese ? CH.ERROR : EN.ERROR;
    String ERROR_MSG = isChinese ? CH.ERROR_MSG : EN.ERROR_MSG;
    String SUCCESS_TPL = isChinese ? CH.SUCCESS_TPL: EN.SUCCESS_TPL;

    interface CH
    {
        String TIME = "计时: ";
        String TIPS = "输入1~9";
        String START = "开始游戏";
        String CONTINUE = "继续游戏";
        String BACK = "回主菜单";
        String RESTART = "重新开始";
        String EXIT = "退出游戏";
        String SETTINGS = "设置";
        String NOTICE = "提示";
        String ERROR = "错误";
        String ERROR_MSG = "初始化错误, 不可挖去超过64个孔,会导致没有唯一解";
        String SUCCESS_TPL = "恭喜你通关! 用时:%s";
    }

    interface EN
    {
        String TIME = "time: ";
        String TIPS = "input 1~9";
        String START = "Start Game";
        String CONTINUE = "CONTINUE";
        String BACK = "Return Menu";
        String RESTART = "Restart";
        String EXIT = "Exit";
        String SETTINGS = "Settings";
        String NOTICE = "Notice";
        String ERROR = "Error";
        String ERROR_MSG = "Initialization error, more than 64 holes, will not have a unique solution";
        String SUCCESS_TPL = "Success! Time: %s";
    }
}
